package com.attendance.www.hr.dao.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.attendance.www.hr.beans.RetroactiveBean;
import com.attendance.www.hr.entitys.Retroactive;

public interface RetroactiveExtMapper {

	List<RetroactiveBean> getRetroactiveList(@Param("employeeId")Integer employeeId,@Param("attendanceDateStart")Date attendanceDateStart,
			@Param("attendanceDateEnd")Date attendanceDateEnd,@Param("startNum")Integer startNum,@Param("pageCount")Integer pageCount);
	
	int countByRetroactiveBean(@Param("employeeId")Integer employeeId,@Param("attendanceDateStart")Date attendanceDateStart,@Param("attendanceDateEnd")Date attendanceDateEnd);
    //获取补签次数
	int countByRetroactiveNum(@Param("employeeId")Integer employeeId,@Param("attendanceDateStart")Date attendanceDateStart,@Param("attendanceDateEnd")Date attendanceDateEnd);
	/**
	 * 获取包括在申请中的补签次数
	 */
	int countRetroactiveNumAble(@Param("employeeId")Integer employeeId,@Param("attendanceDateStart")Date attendanceDateStart,@Param("attendanceDateEnd")Date attendanceDateEnd);
		
	/**
	 * HR获取管理公司的补签信息
	 */
	List<RetroactiveBean> getRetroactiveListByHR(@Param("retroactiveBean")RetroactiveBean retroactiveBean);
	
	/**
	 * HR查补签计数
	 */
	int countByHR(@Param("retroactiveBean")RetroactiveBean retroactiveBean);
	
	List<RetroactiveBean> getRetroactiveCurrent(@Param("attendanceDateStart")Date attendanceDateStart,@Param("attendanceDateEnd")Date attendanceDateEnd);
	
	/**
	 * 查询考勤补签人员
	 * @return
	 */
	List<Integer> getEmployeeIdRetroactive(@Param("employeeList")List<Integer> employeeList,@Param("startDate")Date startDate,@Param("endDate")Date endDate);

	List<Retroactive> getRetroactiveByApprovalState(@Param("retroactiveBean")RetroactiveBean retroactiveBean);
	
	/**
	 * 获取某天能撤回的补签申请list
	 */
	List<RetroactiveBean> getRetroactives(@Param("attendanceDate")Date attendanceDate,@Param("employeeId")Integer employeeId);
	
}
